package com.ruoyi.file.service;

import com.ruoyi.file.utils.OssUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Program: animalSystem->AliOSSISysFileServiceImpl
 * @Description:
 * @Author: donghang
 * @Date: 2023-03-22 14:48
 * @Version： 1.0
 **/


@Primary
@Service
public class AliOSSISysFileServiceImpl implements ISysFileService {

    @Autowired
    private OssUtil ossUtil;


    @Override
    public String uploadFile(MultipartFile file) throws Exception {
        String url = ossUtil.uploadFile(file);
        return url;
    }
}
